<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div th:if="${other}==0" data-th-replace="common/functionDepict"></div>
    <div>
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <div class="row">
                    <div class="col-sm-5">
                        <a  th:href="@{/admin/op/coupon/toOpCouponListPage?other={other}(other=${other})}"><span><button class="btn btn-white" data-toggle="tooltip" data-placement="top" title="" data-original-title="刷新优惠券列表"><i class="fa fa-refresh"></i> 刷新</button></span></a>
                        <small id="totalNum">（共0条优惠券）</small>
                        <input id="couponCount" type="hidden" value=""/>
                        <input id="availableCount" type="hidden" value=""/>
                    </div>
                    <div class="col-sm-3">
                        <form id="search-form" role="form" class="search-form">
                            <input name="other" type="hidden" th:value="${other}"/>
                            <div class="input-group opSearchBox">
                                <input placeholder="请输入优惠券名称" name="title" value="" class="input-sm form-control vam common-search-word" type="text">
                                <span class="input-group-btn"><button type="button" id="querySubmit" class="btn btn-sm btn-primary vam">搜索</button> </span>
                            </div>
                        </form>
                    </div>
                    <div class="col-sm-2 text-center">
                        <a href="javascript: void (0);" id="advSearchshowBtn" class="vam">高级搜索操作 <i class="fa fa-angle-double-down"></i></a>
                    </div>
                    <div th:if="${other}==0" class="col-sm-2 text-center">
                        <a th:href="@{/admin/op/coupon/toSaveOpCouponPage}"><button type="button"  class="btn btn-block btn-danger"> <i class="fa fa-plus-circle"></i> 新建优惠券 </button></a>
                    </div>
                </div>
            </div>
            <div class="oc-advSearch-box">
                <div class="row">
                    <div class="col-sm-2">
                        <div class="pt10">
                            <div class="checkbox i-checks">
                                <label style="padding-left: 0"><input type="checkbox" id="select-all-coupon"> <i></i> 全选</label>
                                <th:block th:if="${other}==0">
                                    <button type="button" id="deleteBatch"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量删除"><i class="fa fa-trash-o"></i></button>
                                    <button type="button" id="unlockBatch"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量停止"><i class="fa fa-pause"></i></button>
                                    <button type="button" id="historyBatch" class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量恢复"><i class="fa fa-history"></i></button>
                                    <!--
                                    <button type="button" id="invalidBatch"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量做废"><i class="fa fa-ban"></i></button>
                                    <button type="button" id="stopBatch"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量停止"><i class="fa fa-pause"></i></button>
                                    -->
                                </th:block>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-10">
                        <div class="pt10">
                            <form  role="form" class="form-inline search-form">
                                <input name="other" type="hidden" th:value="${other}"/>
                                <div class="form-group form-box" style="margin-bottom: 10px;width: 155px;">
                                    <input placeholder="请输入优惠券名称" style="width: 155px; min-width:155px;" class="form-control common-search-word" type="text" >
                                </div>
                                <select class="form-control mb10" name="type">
                                    <option value="">优惠券类型</option>
                                    <option value="1">折扣券</option>
                                    <option value="2">定额券</option>
                                </select>
                                <select th:if="${other}==0" class="form-control mb10" name="status">
                                    <option value="">全部状态</option>
                                    <!-- 未开始，能领取不能用 -->
                                    <option  value="0">未开始</option>
                                    <!-- 进行中，能领能用 -->
                                    <option  value="1">进行中</option>
                                    <!-- 已停止，手动停止，不能领能用 -->
                                    <option  value="2">已停止</option>
                                    <!-- 已结束，不能领不能用 -->
                                    <option  value="7">已结束</option>
                                    <!--<option  value="4">已做废</option>
                                    <option  value="5">已停止</option>-->
                                </select>
                                <select th:if="${other}==0" class="form-control mb10" name="conditions">
                                    <option value="">优惠券获取条件</option>
                                    <option  value="1">手动发放</option>
                                    <option  value="2">新用户注册后自动获取</option>
                                    <option  value="3">学员生日获取</option>
                                    <option  value="5">消费任意金额获取</option>
                                    <option  value="6">免费直播发放</option>
                                    <option value="7">活动</option>
                                    <option value="8">商品详情领取</option>
                                    <option value="9">全部用户可领取</option>
                                    <option value="10">部分用户可领取</option>
                                </select>
                                <div class="form-group" style="margin-bottom: 10px">
                                    <input placeholder="优惠券创建开始时间" name="beginTime" value="" id="startDate" class="laydate-icon form-control layer-date" type="text" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                                </div>
                                <div class="form-group" style="margin-bottom: 10px">
                                    <input placeholder="优惠券创建到期时间" name="endTime" value="" id="endDate" class="laydate-icon form-control layer-date" type="text" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                                </div>
                                <button class="btn btn-w-m btn-primary" id="submitFrom" type="button" style="margin-bottom: 10px">搜索</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="oc-ibox-content" id="coupon-list-context">

            </div>
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript" th:src="@{{path}/admin/business/user/user/select_common_user.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/op/coupon/coupon_list.js?v={v}(path=${staticPath},v=${v})}"> </script>
<script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>

